How to delay user login until RunOnce is completed? [Win XP]
Posted
by Shaitan00
on Stack Overflow
See other posts from Stack Overflow
or by Shaitan00
Published on 2010-05-11T03:07:40Z
Indexed on
2010/05/11
3:14 UTC
Read the original article
Hit count: 192
Currently I have an application that runs at startup when a user log's in to the account (administrative), as well as something under HKLM...\Run which is also executed - but I need to run something once and BEFORE both these things are executed.
My solution was to use HKLM...\RunOnce which is executed before the HKLM...\Run but the task can take 30-45 seconds which gives enough time for the user Startup to be executed and launch the application prematurely.
I thought of maybe including a SLEEP but RunOnce doesn't block the user account load... Then I considered the group policies but they do not have a RunOnce equivalent that I can use... Also I am not sure if Group Policy is run at the right time (never used it before).
Is there anyway to make my RunOnce delay the account startup of my application, or a better place where I can execute it before both HKLM...\Run and user Startup? Or any recommended alternatives?
Any ideas or help would be much appreciated... Thanks,
© Stack Overflow or respective owner